package org.begincode.admin.service;

import org.begincode.core.mapper.ResourceMapper;
import org.begincode.core.model.Resource;
import org.begincode.core.paginator.domain.PageList;
import org.begincode.core.paginator.domain.Paginator;
import org.begincode.core.util.BeginCodePageParam;
import org.begincode.exception.BeginCodeException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by yangsj on 2016/5/2.
 */
@Service
public class ResourceService {
    private Logger logger = LoggerFactory.getLogger(ResourceService.class);

    @Autowired
    ResourceMapper resourceMapper;


    public Resource createResource(Resource record) {
        this.resourceMapper.insertSelective(record);
        return record;
    }

    public int updateByPrimaryKeyWithBLOBs(Resource record) {
        return this.resourceMapper.updateByPrimaryKeyWithBLOBs(record);
    }

}
